package com.study.book.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 *
 * @TableName Order
 */
@TableName(value ="ProOrder")
@Data
public class Order implements Serializable {
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    @TableField(value = "orderNumber")
    private String ordernumber;

    /**
     * 用户ID
     */
    @TableField(value = "adminId")
    private Integer adminid;

    /**
     * 用户名称
     */
    @TableField(exist=false)
    private String adminName;

    /**
     * 商品ID
     */
    @TableField(value = "productId")
    private Integer productid;

    /**
     * 产品名称
     */
    @TableField(exist=false)
    private String productName;

    /**
     * 图片
     */
    @TableField(exist=false)
    private String photo;

    /**
     * 单价
     */
    @TableField(exist=false)
    private BigDecimal price;

    /**
     * 图书馆
     */
    @TableField(exist=false)
    private String libraryName;


    /**
     * 商品数量
     */
    @TableField(value = "quantity")
    private Integer quantity;

    /**
     * 订单提交时间
     */
    @TableField(value = "commitTime")
    @JsonFormat(pattern="YYYY-MM-dd HH:mm")
    private Date committime;

    /**
     * 订单评价
     */
    @TableField(value = "comment")
    private String comment;

    /**
     * 图书馆id
     */
    @TableField(value = "libraryId")
    private String libraryId;

    /**
     * 订单状态1待评价 2已完成
     */
    private String status;
    /**
     * 订单价格
     */
    private BigDecimal payCost;

    /**
     * 评分星数，几星好评
     */
    @TableField(value = "star")
    private Integer star;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
